<?php defined("APP_VERSION") OR die("No Access"); ?>
<?php $this->templateBlock('Login:header'); ?>
<form method="post" id="J_login-form" action="<?php echo $this->baseUrl('login', 'index');?>">
  <!-- 提示框 -->
  <div class="main-top">
    <p class="login-switch">还没有账号？<a href="<?php echo $this->baseUrl('login', 'register');?>">立即注册</a></p>
    <div class="page-title"> <strong class="title-main">会员登录，欢迎回到喵喵LF点评！</strong> </div>
  </div>
  <!-- 主题内容 -->
  <div class="main page-sa Fix">
<div class="section">
    <div class="block login-form" id="cont-log">
      <div class="form-block">
        <label class="label" for="J_usrname">帐号：</label>
        <input type="text" size="30" class="form-txt form-txt-l username" tabindex="1" id="J_usrname" value="" name="username" />
        <span id="J_fv-usrname" class="form-msg-box mb-note fv_username">请输入注册的邮箱.</span>
        <div class="form-content-block form-note-block" style="display: none;">
          <span class="note">可使用邮箱、手机号登录</span>
        </div>     
      </div>

      <!--两种不同错误提示的情况-->
      <div class="form-block">
        <label class="label" for="J_pwd">密码：</label>
        <input type="password" size="30" class="form-txt form-txt-l password" tabindex="2" id="J_pwd" name="password" />
        <span id="J_fv-pwd" class="form-msg-box mb-error fv_password Hide"></span>
        <div class="form-content-block form-note-block">
          	<span class="note"><a href="/resetpassword">忘记密码</a></span>
        </div>        
      </div>
      <div id="ctl00_PlaceHolderPage_divCapchaCode" class="form-block">
        <div class="form-content-block form-note-block b-captcha">
          <img alt="看不清楚?请点击!" id="mcImgVC" onclick="this.src='<?php echo $this->baseUrl('login', 'validateCode');?>&' + Math.floor(Math.random()*1001);" src="<?php echo $this->baseUrl('login', 'validateCode');?>">
          <span class="note"><a href="#" onclick="document.getElementById('mcImgVC').src='<?php echo $this->baseUrl('login', 'validateCode');?>&' + Math.floor(Math.random()*1001);return false;">看不清？换一张</a></span>
        </div>
        <span class="label">验证码：</span>
        <input type="text" name="validate" id="J_validate" tabindex="3" class="form-txt form-txt-s validate" size="60">
        <span id="J_fv-validate" class="form-msg-box mb-error fv_validate Hide"></span>
      </div>
	  <div class="form-block" style="display: none;">
        <div class="form-content-block chk-unit form-note-block">
          <input type="checkbox" name="keepLogin" id="J_cookie"><label for="J_cookie">一个月之内免登录</label>
        </div>
        <div class="form-content-block chk-unit form-note-block provision">
          <input type="checkbox" checked="checked" name="" id="agreeprovision"><label for="agreeprovision">我已看过并同意大众点评网<a href="http://www.dianping.com/aboutus/useragreement" target="_blank">《用户使用协议》</a></label>
        </div>
      </div>
      <div class="block form-btn-block form-block form-content-block form-btn-static">
        <strong class="btn-type-c btn-fn-e">
            <input type="submit" class="form-btn" tabindex="4" id="J_login-btn" value="登 录" name="login" />
        </strong>
      </div>
    </div>          
  </div>  
    <div class="aside aside-right">
      <div style="display: none;" class="block b-other"> 使用 <a href="javascript:void(0);">喵喵会员卡号登录&raquo;</a> </div>
      <div class="block b-ids" style="zoom:1">
        <div class="block-title">您也可以使用下列帐号登录喵喵：</div>
        <ul style="height: 50px; ">
          <li> <span class="id-qq"> <a href="#" name="btQQLogin" value="腾讯QQ登录" id="btQQLogin" onclick="pageTracker._trackPageview('dp_thirdlogin_QQ');">QQ帐号</a> </span> </li>
          <li> <span class="id-renren"> <a href="#" name="xn_login_image" value="人人网帐号" id="btRenLogin" onclick="pageTracker._trackPageview('dp_thirdlogin_renren');">人人网帐号</a> </span> </li>
          <li> <span class="id-weibo"> <a href="#" name="btSinaLogin" value="新浪微博帐号" id="btSinaLogin" onclick="pageTracker._trackPageview('dp_thirdlogin_sina');">新浪微博帐号</a> </span> </li>
          <li> <span class="id-kaixin"> <a href="#" name="btKaiLogin" value="开心网帐号" id="btKaiLogin" onclick="pageTracker._trackPageview('dp_thirdlogin_kaixin');">开心网帐号</a> </span> </li>
          <li> <span class="id-alipay"> <a href="#" name="btAliPayLogin" value="支付宝帐号" id="btAliPayLogin" onclick="pageTracker._trackPageview('dp_thirdlogin_alipay');">支付宝登录</a> </span> </li>
          <li> <span class="id-sohu"> <a href="#" name="btSohuLogin" value="搜狐微博帐号" id="btSohuLogin" onclick="pageTracker._trackPageview('dp_thirdlogin_sohu');">搜狐微博帐号</a> </span> </li>
          <li> <span class="id-360"> <a href="#" name="bt360Login" value="360帐号" id="bt360Login" onclick="pageTracker._trackPageview('dp_thirdlogin_360');">360帐号</a> </span> </li>
          <li> <span class="id-baidu"> <a href="#" name="btHao123Login" value="百度帐号" id="btHao123Login" onclick="pageTracker._trackPageview('dp_thirdlogin_baidu');">百度帐号</a> </span> </li>
        </ul>
        <a title="展开" href="javascript:;" class="b-ids-toggle ">展开/收起</a> </div>
    </div>
  </div>
</form>
<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
var loginform = {
	uname_id : 'J_usrname',
	validate_id : 'J_validate',
	check_uanme : function() {
		regObj = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
		check_result = regObj.test($('#'+loginform.uname_id).val());
		if (check_result) {
			$('#J_fv-usrname').removeClass('Hide mb-note').css('color', 'green').html('邮箱 输入正确.');
		} else {
			$('#J_fv-usrname').css('color', 'red').html('邮箱输入有误,请输入正确的邮箱.');
		}
		
		return check_result;
	},
	check_code : function() {
		regObj = /^[\u4e00-\u9fa5]{3,3}$/;
		check_result = regObj.test($('#'+loginform.validate_id).val());
		if (check_result) {
			$('#J_fv-validate').removeClass('Hide mb-error').css('color', 'green').html('验证码 符合要求.');
		} else {
			$('#J_fv-validate').removeClass('Hide').css('color', 'red').html('验证码为三个汉字.');
		}
		return check_result;
	}
};

document.getElementById(loginform.uname_id).onblur = loginform.check_uanme;
document.getElementById(loginform.validate_id).onblur = loginform.check_code;
</script>
<?php $this->templateBlock('Comm:footer'); ?>
</body>
</html>